cmake_minimum_required(VERSION 3.10)

project(PWSAgent)

add_subdirectory(encrypt)
add_subdirectory(sx1262)

find_package(PkgConfig REQUIRED)
pkg_check_modules(deps REQUIRED IMPORTED_TARGET glib-2.0)

add_executable(PWSAgent main.c LoRA.c lora_task.c mqtt_task.c pack.c ws_data.c ota.c log.c timestamp.c)

target_link_libraries(PWSAgent encrypt sx1262 pthread cli mosquitto PkgConfig::deps)

